<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 第一步:引包 -->
    <script src="../js/vue.js"></script>
</head>

<body>
    <!-- 第二步：准备容器,vue模板 -->
    <div id="app">
        <h1>你好{{name}}</h1>
        <h2>{{age}}---{{hobby}}</h2>
    </div>
</body>

</html>
<script>
   
    const VM = new Vue({
        data(){ //data第二种写法(函数的写法)
           return {
              name:"今天是一个好日子,吃了火锅",
              age:18,
              sex:'爷们',
              hobby:'游戏'
           }
        }
    });
    VM.$mount('#app');
</script>